home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 12: Textmags & Docs / nf_archive_12.iso / MAGS / SOURCES / ATARI_SRC.ZIP / atari source / HDX_BACK / HDLFILE / OBDEFS.H < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-09  |  5.5 KB  |  256 lines

  1. /*
  2. *************************************************************************
  3. *            Revision Control System
  4. * =======================================================================
  5. *  $Revision: 2.2 $    $Source: /u2/MRS/osrevisions/aes/obdefs.h,v $
  6. * =======================================================================
  7. *  $Author: mui $    $Date: 89/04/26 18:29:21 $    $Locker:  $
  8. * =======================================================================
  9. *  $Log:    obdefs.h,v $
  10. * Revision 2.2  89/04/26  18:29:21  mui
  11. * TT
  12. * Revision 2.1  89/02/22  05:31:23  kbad
  13. * *** TOS 1.4  FINAL RELEASE VERSION ***
  14. * Revision 1.1  88/06/02  12:35:57  lozben
  15. * Initial revision
  16. *************************************************************************
  17. */
  18.  
  19. #define WORD    int
  20. #define UWORD     unsigned int
  21. #define LONG    long
  22.  
  23.  
  24. /*    OBDEFS.H    03/15/84 - 02/08/85    Gregg Morris        */
  25.  
  26. #define ROOT 0
  27. #define NIL -1
  28.                         /* keybd states        */
  29. #define K_RSHIFT 0x0001
  30. #define K_LSHIFT 0x0002
  31. #define K_CTRL 0x0004
  32. #define K_ALT 0x00008
  33.                         /* max string length    */
  34. #define MAX_LEN 81
  35.                         /* max depth of search    */
  36.                         /*   or draw for objects*/
  37. #define MAX_DEPTH 8
  38.                         /* inside patterns    */
  39. #define IP_HOLLOW 0
  40. #define IP_1PATT 1
  41. #define IP_2PATT 2
  42. #define IP_3PATT 3
  43. #define IP_4PATT 4
  44. #define IP_5PATT 5
  45. #define IP_6PATT 6
  46. #define IP_SOLID 7
  47.                         /* system foreground and*/
  48.                         /*   background rules    */
  49.                         /*   but transparent    */
  50. #define SYS_FG 0x1100
  51.  
  52. #define WTS_FG 0x11a1                /* window title selected*/
  53.                         /*   using pattern 2 &    */
  54.                         /*   replace mode text     */
  55. #define WTN_FG 0x1100                /* window title normal    */
  56.                         /* gsx modes        */
  57. #define MD_REPLACE 1
  58. #define MD_TRANS 2
  59. #define MD_XOR 3
  60. #define MD_ERASE 4
  61.                         /* gsx styles        */
  62. #define FIS_HOLLOW 0
  63. #define FIS_SOLID 1
  64. #define FIS_PATTERN 2
  65. #define FIS_HATCH 3
  66. #define FIS_USER 4
  67.                         /* bit blt rules    */
  68. #define ALL_WHITE 0
  69. #define S_AND_D 1
  70. #define S_ONLY 3
  71. #define NOTS_AND_D 4
  72. #define S_XOR_D 6
  73. #define S_OR_D 7
  74. #define D_INVERT 10
  75. #define NOTS_OR_D 13
  76. #define ALL_BLACK 15
  77.                         /* font types        */
  78. #define IBM 3
  79. #define SMALL 5
  80.  
  81. /* Object Drawing Types */
  82.                         /* Graphic types of obs    */
  83. #define G_BOX 20
  84. #define G_TEXT 21
  85. #define G_BOXTEXT 22
  86. #define G_IMAGE 23
  87. #define G_USERDEF 24
  88. #define G_IBOX 25
  89. #define G_BUTTON 26
  90. #define G_BOXCHAR 27
  91. #define G_STRING 28
  92. #define G_FTEXT 29
  93. #define G_FBOXTEXT 30
  94. #define G_ICON 31
  95. #define G_TITLE 32
  96.                         /* Object flags         */
  97. #define NONE 0x0
  98. #define SELECTABLE 0x1
  99. #define DEFAULT 0x2
  100. #define EXIT 0x4
  101. #define EDITABLE 0x8
  102. #define RBUTTON 0x10
  103. #define LASTOB 0x20
  104. #define TOUCHEXIT 0x40
  105. #define HIDETREE 0x80
  106. #define INDIRECT 0x100
  107.                         /* Object states    */
  108. #define NORMAL 0x0
  109. #define SELECTED 0x1
  110. #define CROSSED 0x2
  111. #define CHECKED 0x4
  112. #define DISABLED 0x8
  113. #define OUTLINED 0x10
  114. #define SHADOWED 0x20
  115. #define WHITEBAK 0x40
  116.                         /* Object colors    */
  117. #define WHITE 0
  118. #define BLACK 1
  119. #define RED 2
  120. #define GREEN 3
  121. #define BLUE 4
  122. #define CYAN 5
  123. #define YELLOW 6
  124. #define MAGENTA 7
  125. #define LWHITE 8
  126. #define LBLACK 9
  127. #define LRED 10
  128. #define LGREEN 11
  129. #define LBLUE 12
  130. #define LCYAN 13
  131. #define LYELLOW 14
  132. #define LMAGENTA 15
  133.  
  134. #define OBJECT struct object
  135.  
  136. OBJECT
  137. {
  138.     WORD        ob_next;    /* -> object's next sibling    */
  139.     WORD        ob_head;    /* -> head of object's children */
  140.     WORD        ob_tail;    /* -> tail of object's children */
  141.     UWORD        ob_type;    /* type of object- BOX, CHAR,...*/
  142.     UWORD        ob_flags;    /* flags            */
  143.     UWORD        ob_state;    /* state- SELECTED, OPEN, ...    */
  144.     LONG        ob_spec;    /* "out"- -> anything else    */
  145.     WORD        ob_x;        /* upper left corner of object    */
  146.     WORD        ob_y;        /* upper left corner of object    */
  147.     WORD        ob_width;    /* width of obj            */
  148.     WORD        ob_height;    /* height of obj        */
  149. };
  150.  
  151. #define ORECT    struct orect
  152.  
  153. ORECT
  154. {
  155.     ORECT    *o_link;
  156.     WORD    o_x;
  157.     WORD    o_y;
  158.     WORD    o_w;
  159.     WORD    o_h;
  160. } ;
  161.  
  162.  
  163. #define GRECT    struct grect
  164.  
  165. GRECT
  166. {
  167.     WORD    g_x;
  168.     WORD    g_y;
  169.     WORD    g_w;
  170.     WORD    g_h;
  171. } ;
  172.  
  173.  
  174. #define TEDINFO struct text_edinfo
  175.  
  176. TEDINFO
  177. {
  178.     LONG        te_ptext;    /* ptr to text (must be 1st)    */
  179.     LONG        te_ptmplt;    /* ptr to template        */
  180.     LONG        te_pvalid;    /* ptr to validation chrs.    */
  181.     WORD        te_font;    /* font                */
  182.     WORD        te_junk1;    /* junk word            */
  183.     WORD        te_just;    /* justification- left, right...*/
  184.     WORD        te_color;    /* color information word    */
  185.     WORD        te_junk2;    /* junk word            */
  186.     WORD        te_thickness;    /* border thickness        */
  187.     WORD        te_txtlen;    /* length of text string    */
  188.     WORD        te_tmplen;    /* length of template string    */
  189. };
  190.  
  191.  
  192. #define ICONBLK struct icon_block
  193.  
  194. ICONBLK
  195. {
  196.     LONG    ib_pmask;
  197.     LONG    ib_pdata;
  198.     LONG    ib_ptext;
  199.     WORD    ib_char;
  200.     WORD    ib_xchar;
  201.     WORD    ib_ychar;
  202.     WORD    ib_xicon;
  203.     WORD    ib_yicon;
  204.     WORD    ib_wicon;
  205.     WORD    ib_hicon;
  206.     WORD    ib_xtext;
  207.     WORD    ib_ytext;
  208.     WORD    ib_wtext;
  209.     WORD    ib_htext;
  210. };
  211.  
  212. #define BITBLK struct bit_block
  213.  
  214. BITBLK
  215. {
  216.     LONG    bi_pdata;        /* ptr to bit forms data    */
  217.     WORD    bi_wb;            /* width of form in bytes    */
  218.     WORD    bi_hl;            /* height in lines        */
  219.     WORD    bi_x;            /* source x in bit form        */
  220.     WORD    bi_y;            /* source y in bit form        */
  221.     WORD    bi_color;        /* fg color of blt         */
  222. };
  223.  
  224.  
  225. #define USERBLK struct user_blk
  226. USERBLK
  227. {
  228.     LONG    ub_code;
  229.     LONG    ub_parm;
  230. };
  231.  
  232. #define PARMBLK struct parm_blk
  233. PARMBLK
  234. {
  235.     LONG    pb_tree;
  236.     WORD    pb_obj;
  237.     WORD    pb_prevstate;
  238.     WORD    pb_currstate;
  239.     WORD    pb_x, pb_y, pb_w, pb_h;
  240.     WORD    pb_xc, pb_yc, pb_wc, pb_hc;
  241.     LONG    pb_parm;
  242. };
  243.  
  244.  
  245. #define EDSTART 0
  246. #define EDINIT 1
  247. #define EDCHAR 2
  248. #define EDEND 3
  249.  
  250. #define TE_LEFT 0
  251. #define TE_RIGHT 1
  252. #define TE_CNTR 2
  253.